e
#Title[uZXeBAECfv]
#Text[p`[̖@J[h̔
uZXeBAECfv]
#BackGround[User]
#BGM[.\..\bgm\bgm.wav]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {
	
	////////////////////////////////////////////////////////////////////////
	//                                                          //
	//   [U[fBCx                                       //
	////////////////////////////////////////////////////////////////////////
	
	@Initialize{
		InitializeData();
		
		LoadUserShotData(shot_ryoyan);
		
		SetLife(1000);
		SetMovePosition03(GetCenterX(),140,10,8);
		SetDamageRate(22,16);
		SetInvincibility(240);
		SetCollisionEx(32,16);
		SetEnemyMarker(true);
		
		TMain();
	}
	
	@MainLoop{
		yield;
	}
	
	@DrawLoop{
		DrawBoss(imgBoss);
	}
	
	@Finalize{
		FinalizeData();
	}
	
	task TMain(){
		wait(60);
		
		DeclareSpell();
		
		Atack();
		Move();
	}
	
	function DeclareSpell(){
		SetTimer(90);
		CutIn(YOUMU,"uZXeBAECfv",NULL,0,0,0,0);
		SetScore(1000000);
		wait(180);
	}
	
	task Atack(){
		let count=0;
		let ang=rand(0,360);
		
		loop{
			let ang2=ang+count*4.3;
			let x=GetX()+cos(ang2)*100;
			let y=GetY()+sin(ang2+count)*100;
			let ang3=atan2(GetPlayerY()-y,GetPlayerX()-x);
			CreateLaserA(0,x,y,600,15,_WHITE14(),60);
			SetLaserDataA(0,0,ang2-90*p1m0(count),0,0,0,0);
			SetShotKillTime(0,60 + 40);
			let id=FireShot(0);
			AA_LaserCloseAB(id,60,40);
			CreateShotA(0,x,y,0);
			SetShotDataA(0,0,0,count*124.3,0,0.01,2,_WHITE04());
			FireShot(0);
			count++;
			wait(1);
		}
	}
	
	task Move(){
	}
	
	#include_function ".\..\functions\initialize.txt"
	#include_function ".\..\functions\color_set.txt"
	#include_function ".\..\functions\function.txt"
}
